#ifndef ARDUINO_LIB_MOTOR_H
#define ARDUINO_LIB_MOTOR_H

#include <Arduino.h>

class Motor
{
	public:
		enum MotorMode
		{
			MODE_CW = 0,
			MODE_CCW,
			MODE_SHORT_BRAKE,
			MODE_INVALID
		};
		Motor();
		~Motor();
		void attach(uint8_t pwmPin, uint8_t ctrlPin);
		void mode(MotorMode m);
		void speedUp(int val);
		void shortBrake();
	private:
		uint8_t pwmPin_;
		uint8_t ctrlPin_;
		MotorMode mode_ {MODE_SHORT_BRAKE};
};

#endif
